home *** CD-ROM | disk | FTP | other *** search
- /*
- * © Copyright Jeff Francis 1990
- * All rights reserved
- *
- * $Id$
- *
- * Description - CAfterDark is a base class for developing graphics
- * modules for After Dark. This class defines the default behaviour
- * for all graphics module classes. Subclasses can add additional
- * behaviour. Page references are to "After Dark Programmer's Manual."
- *
- * NOTE - The GlueCode WILL LOCK DOWN the "this" pointer before it
- * sends any messages to the object. This way, you don't have to
- * worry about assignment to instance variables and passing to them
- * to functions. For more information on this see Curt Bianchi's
- * "Using Objects Safely in Object Pascal" develop, April 1990.
- * Altough this paper applies to Object Pascal, Object C works
- * about the same way.
- *
- */
-
- #include "CAfterDark.h"
-
- /*
- * Initialize does nothing. Subclasses should override this method to
- * initialize any instance variables and setup the initial state of the
- * graphics module. If your class contains instance variables that need
- * to be newed, then new them here. Be sure to delete them when you
- * receive the Close message.
- * (Page 17 - initialize)
- */
- OSErr CAfterDark::Initialize(RgnHandle blankRgn, GMParamBlockPtr params)
- {
- return noErr;
- }
-
-
- /*
- * Blank fills the blankRgn with black thus blanking the screen(s).
- * (Page 18 - blank)
- */
- OSErr CAfterDark::Blank(RgnHandle blankRgn, GMParamBlockPtr params)
- {
- FillRgn(blankRgn, params->qdGlobalsCopy->qdBlack);
- return noErr;
- }
-
-
- /*
- * DrawFrame does nothing. Subclasses should override this method
- * to perform their animation.
- * (Page 18 - DrawFrame)
- */
- OSErr CAfterDark::DrawFrame(RgnHandle blankRgn, GMParamBlockPtr params)
- {
- return noErr;
- }
-
-
- /*
- * Close does nothing. Subclasses should override this method
- * to release any memory allocated by their subclass and to clean
- * things up before closing. NOTE: you shouldn't delete the
- * instance of your object (i.e., this) because the GlueCode will
- * do it for you.
- * (Page 18 - Close)
- */
- OSErr CAfterDark::Close(RgnHandle blankRgn, GMParamBlockPtr params)
- {
- return noErr;
- }
-
-
- /*
- * ButtonMessage does nothing. Subclasses should override this method to
- * handle button messages.
- * (Page 18 - ButtonMessages)
- */
- OSErr CAfterDark::ButtonMessage(RgnHandle blankRgn, GMParamBlockPtr params, eMessage message)
- {
- return noErr;
- }
-
-
- /*
- * ModuleSelected does nothing. Subclasses should override this method
- * to setting up the module's control panel.
- * (Page 18 - ModuleSelected)
- */
- OSErr CAfterDark::ModuleSelected(RgnHandle blankRgn, GMParamBlockPtr params)
- {
- return noErr;
- }
-
-
- /*
- * DoHelp does nothing. Subclasses should override this method to
- * perform application specific Help dialogs.
- * (Page 18 - DoHelp)
- */
- OSErr CAfterDark::DoHelp(RgnHandle blankRgn, GMParamBlockPtr params)
- {
- return noErr;
- }